home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / widget / nsISound.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  3KB  |  135 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsISound.idl
  3.  */
  4.  
  5. #ifndef __gen_nsISound_h__
  6. #define __gen_nsISound_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIURL; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsISound */
  21. #define NS_ISOUND_IID_STR "b148eed1-236d-11d3-b35c-00a0cc3c1cde"
  22.  
  23. #define NS_ISOUND_IID \
  24.   {0xb148eed1, 0x236d, 0x11d3, \
  25.     { 0xb3, 0x5c, 0x00, 0xa0, 0xcc, 0x3c, 0x1c, 0xde }}
  26.  
  27. class NS_NO_VTABLE nsISound : public nsISupports {
  28.  public: 
  29.  
  30.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISOUND_IID)
  31.  
  32.   /* void play (in nsIURL aURL); */
  33.   NS_IMETHOD Play(nsIURL *aURL) = 0;
  34.  
  35.   /**
  36.    * for playing system sounds
  37.    */
  38.   /* void playSystemSound (in string soundAlias); */
  39.   NS_IMETHOD PlaySystemSound(const char *soundAlias) = 0;
  40.  
  41.   /* void beep (); */
  42.   NS_IMETHOD Beep(void) = 0;
  43.  
  44.   /**
  45.     * Not strictly necessary, but avoids delay before first sound.
  46.     * The various methods on nsISound call Init() if they need to.
  47.     */
  48.   /* void init (); */
  49.   NS_IMETHOD Init(void) = 0;
  50.  
  51. };
  52.  
  53. /* Use this macro when declaring classes that implement this interface. */
  54. #define NS_DECL_NSISOUND \
  55.   NS_IMETHOD Play(nsIURL *aURL); \
  56.   NS_IMETHOD PlaySystemSound(const char *soundAlias); \
  57.   NS_IMETHOD Beep(void); \
  58.   NS_IMETHOD Init(void); 
  59.  
  60. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  61. #define NS_FORWARD_NSISOUND(_to) \
  62.   NS_IMETHOD Play(nsIURL *aURL) { return _to Play(aURL); } \
  63.   NS_IMETHOD PlaySystemSound(const char *soundAlias) { return _to PlaySystemSound(soundAlias); } \
  64.   NS_IMETHOD Beep(void) { return _to Beep(); } \
  65.   NS_IMETHOD Init(void) { return _to Init(); } 
  66.  
  67. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  68. #define NS_FORWARD_SAFE_NSISOUND(_to) \
  69.   NS_IMETHOD Play(nsIURL *aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->Play(aURL); } \
  70.   NS_IMETHOD PlaySystemSound(const char *soundAlias) { return !_to ? NS_ERROR_NULL_POINTER : _to->PlaySystemSound(soundAlias); } \
  71.   NS_IMETHOD Beep(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Beep(); } \
  72.   NS_IMETHOD Init(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(); } 
  73.  
  74. #if 0
  75. /* Use the code below as a template for the implementation class for this interface. */
  76.  
  77. /* Header file */
  78. class nsSound : public nsISound
  79. {
  80. public:
  81.   NS_DECL_ISUPPORTS
  82.   NS_DECL_NSISOUND
  83.  
  84.   nsSound();
  85.  
  86. private:
  87.   ~nsSound();
  88.  
  89. protected:
  90.   /* additional members */
  91. };
  92.  
  93. /* Implementation file */
  94. NS_IMPL_ISUPPORTS1(nsSound, nsISound)
  95.  
  96. nsSound::nsSound()
  97. {
  98.   /* member initializers and constructor code */
  99. }
  100.  
  101. nsSound::~nsSound()
  102. {
  103.   /* destructor code */
  104. }
  105.  
  106. /* void play (in nsIURL aURL); */
  107. NS_IMETHODIMP nsSound::Play(nsIURL *aURL)
  108. {
  109.     return NS_ERROR_NOT_IMPLEMENTED;
  110. }
  111.  
  112. /* void playSystemSound (in string soundAlias); */
  113. NS_IMETHODIMP nsSound::PlaySystemSound(const char *soundAlias)
  114. {
  115.     return NS_ERROR_NOT_IMPLEMENTED;
  116. }
  117.  
  118. /* void beep (); */
  119. NS_IMETHODIMP nsSound::Beep()
  120. {
  121.     return NS_ERROR_NOT_IMPLEMENTED;
  122. }
  123.  
  124. /* void init (); */
  125. NS_IMETHODIMP nsSound::Init()
  126. {
  127.     return NS_ERROR_NOT_IMPLEMENTED;
  128. }
  129.  
  130. /* End of implementation class template. */
  131. #endif
  132.  
  133.  
  134. #endif /* __gen_nsISound_h__ */
  135.